package com.syscom.common.utils;

/**
 * @author wjz
 * @date 2020/11/27 10:41
 * @Description  文本工具类
 */
public class TextUtil {

    //首字母大写
    public static String firstToUpperCase(String name) {
        //name = name.substring(0, 1).toLowerCase() + name.substring(1);
        //return  name;
        char[] cs=name.toCharArray();
        cs[0]-=32;
        return String.valueOf(cs);
    }

    //首字母小写
    public static String firstToLowerCase(String name) {

        char[] cs=name.toCharArray();
        cs[0]+=32;
        return String.valueOf(cs);
    }

}
